package com.woniuxy.credit_loans.product_liu.service.impl;

import com.woniuxy.credit_loans.entity.Product;
import com.woniuxy.credit_loans.mapper.ProductMapper;
import com.woniuxy.credit_loans.product_liu.dto.ProductDto;
import com.woniuxy.credit_loans.product_liu.service.ProductService;
import com.woniuxy.credit_loans.product_liu.vo.EchartsVo;
import com.woniuxy.credit_loans.product_liu.vo.ProductVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ProductServiceImpl implements ProductService {
    @Autowired
    private ProductMapper productMapper;

    @Override
    public List<ProductVo> selectWaittingProduct() {
        return productMapper.selectWaittingProduct();
    }

    @Override
    public Product selectOne(Long productId) {
        return productMapper.selectOne(productId);
    }

    @Override
    public List<EchartsVo> classifyByType() {
        return productMapper.classifyByType();
    }

    @Override
    public List<ProductVo> selectByExport(ProductDto productDto) {
        return productMapper.selectByExport(productDto);
    }

    @Override
    public List<ProductVo> selectByLike(Product product) {
        return productMapper.selectByLike(product);
    }

    @Override
    public List<ProductVo> selectCompanyProduct() {
        return productMapper.selectCompanyProduct();
    }

    @Override
    public List<ProductVo> selectPersonProduct() {
        return productMapper.selectPersonProduct();
    }

    @Override
    public List<ProductVo> selectAllProduct() {
        return productMapper.selectAllProduct();
    }

    @Override
    public int deleteByPrimaryKey(Long id) {
        return productMapper.deleteByPrimaryKey(id);
    }

    @Override
    public int insertSelective(Product record) {
        return productMapper.insertSelective(record);
    }

    @Override
    public Product selectByPrimaryKey(int id) {
        return productMapper.selectByPrimaryKey(id);
    }

    @Override
    public int updateByPrimaryKeySelective(Product record) {
        return productMapper.updateByPrimaryKeySelective(record);
    }
}
